/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Dike } from '../models/Dike';
import type { DikeQueryCriteria } from '../models/DikeQueryCriteria';
import type { RPageDike } from '../models/RPageDike';
import type { RString } from '../models/RString';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class DikeService {

    /**
     * @param requestBody 
     * @returns RString OK
     * @throws ApiError
     */
    public static updateDike(
requestBody: Dike,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: '/dike',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody 
     * @returns RString OK
     * @throws ApiError
     */
    public static addDike(
requestBody: Dike,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/dike',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param uid 
     * @returns RString OK
     * @throws ApiError
     */
    public static deleteDike(
uid: number,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/dike',
            query: {
                'uid': uid,
            },
        });
    }

    /**
     * 批量获取大坝信息
     * 批量获取用户信息，用于页面展示
     * @param requestBody 
     * @returns RPageDike OK
     * @throws ApiError
     */
    public static queryDikeAll(
requestBody: DikeQueryCriteria,
): CancelablePromise<RPageDike> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/dike/list',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

}
